<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .container {
      width: 500px;
      height: 500px;
      background-color: orange;

      display: flex;

      /* flex-wrap */
      /* nowrap: 默认值 不换行 */
      /* wrap 多行 */
      /* wrap-reverse 多行 从下往上 */

      /* flex-wrap: nowrap; */
      /* flex-wrap: wrap; */
      /* flex-wrap: wrap-reverse; */

      /* flex-flow Syntax: <'flex-direction'> || <'flex-wrap'> */
      flex-flow: row-reverse wrap;
    }

    .item {
      width: 120px;
      height: 120px;

      background-color: #f00;
    }
  </style>
</head>

<body>

  <div class="container">
    <div class="item item1">1</div>
    <div class="item item2">2</div>
    <div class="item item3">3</div>
  </div>

  <script src="./js/itemRandomColor.js"></script>
</body>

</html>